package com.qfedu.zf.app.controller;

import com.qfedu.zf.app.service.ListingsFeign;
import com.qfedu.zf.common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * --- 天道酬勤 ---
 *
 * @author FanShuhu
 * @date 2024/6/15
 * @desc -- 代码敲烂 月薪过万--
 */

@RestController
@RequestMapping("/api/listings")
public class ListingsController {

    @Autowired
    ListingsFeign  listingsFeign;

    @RequestMapping("/selectByCityAll")
    public R selectByCityAll(@RequestParam Map map) {
//        System.out.println("收到请求");
        return listingsFeign.selectByCityAll(map);
    }

    @RequestMapping("/info")
    public R info(@RequestParam Map<String,Object> map, HttpServletRequest request) {
        return listingsFeign.info(map);
    }

}
